Coupling in software indicates the degree of interconnection between software components such as routines, classes and modules. Tighter coupling may increase the chance that a fault in one of the components will cause a failure in other components, may increase the chance that changes in one component will cause problems in other components, and may increase programmer time in understanding the details of other components.
Metrics to measure coupling in software have been suggested. Some coupling metrics have been informal and subjective, while others have been precisely defined. Coupling has been identified and measured by analyzing the software specifications or the source code. Code implementation may deviate significantly from the software specifications, therefore coupling metrics derived from the specifications may inaccurately represent the coupling of the code as actually implemented. Deriving coupling metrics from source code must be done in a manner that is very specific to the language of the source code.